//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    foxgame:{
      name:'飞狐互动',
      id:123456
    }
  },
requestData(){
  wx.request({
    url: 'https://qmby.feefoxes.com/reportstatistics/data.json',
    success: res => {
      console.log(res)

      this.setData({
        imgUrls:res.data.banner,
        hot:res.data.hot,
        apps:res.data.apps
      })
    }
  })
  },
  onLoad: function () {
   this.requestData()
  },
  onShareAppMessage: function (res) {
    console.log(res)
    return {
      title: '123游戏盒子',
      path:'/pages/index/index',
      success: function(res) {
        wx.showToast({title: '分享成功',icon:'none',duration:1000})

      },
      fail: function(res) {
        wx.showToast({title: '分享失败',icon:'none',duration:1000})
      }
    }
  }

})
